import 'package:flutter/material.dart';
import 'package:flutter_ume/flutter_ume.dart';
import 'package:ume_log_plugin/core/log_cus_btn.dart';
import 'package:ume_log_plugin/core/log_widget.dart';

import 'log_ctrl_able.dart';

class LogUMEPlugin extends Pluggable {
  final LogCtrlable logCtrl;
  final LogCusBtnActions btnActions;

  LogUMEPlugin(this.logCtrl, this.btnActions);

  @override
  Widget buildWidget(BuildContext? context) {
    // logCtrl.logContext = context;
    return LogWidget(
      logCtrl: logCtrl,
      btnActions: btnActions,
    );
  }

  @override
  String get displayName => "App Log";

  @override
  ImageProvider<Object> get iconImageProvider => const AssetImage("assets/icon_console.png", package: "ume_log_plugin");

  @override
  String get name => "App Log";

  @override
  void onTrigger() {}
}
